<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link href="cartStyle2.css" rel="stylesheet" type="text/css" />
        
	</head>
	<body class="content">
		
		<img class="logo" src="img/dd_logo.jpg"/>
		<span onclick="javascript:window.close()">关闭</span>
	
		<div class="cartList">;
			<span onclick="count()">结算</span>
<!--	<span onclick="javascript:alert('tom')">结算</span>
-->			<ul>
				<li id="list1">
					<p onclick="keep()">移入收藏</p>
					<p onclick="remove()">删除</p>
					
				</li>
				<li id="list2">
					<p onclick="keep()">移入收藏</p>
					<p onclick="remove()">删除</p>
					
				</li>
				<li id="RMB1">¥</li>
				<li id="RMB2">¥</li>
				<li id="input1">
					<input id="ip1"  name="minus" type="button" value="-" />
					<input id="ip3"  type="text" />
					<input id="ip2"  name="plus" type="button" value="+"/>
					
					<input id="count1" type="text" />
					
					<input id="ip1a"  name="minus" type="button" value="-" />
					<input id="ip3a"  type="text" />
					<input id="ip2a"  name="plus" type="button" value="+"/>
					
					<input id="count2" type="text" />
					
					<input id="price1" type="text" />
					<input id="price2" type="text" />
				</li>
				
				
				
			</ul>
			
		</div>
	</body>
	<script type="text/javascript">
        	
        	function count(){
        		try{
        	var aInput=document.getElementById("ip3");
        	var aAmout=document.getElementById("price1");
        	var bInput=document.getElementById("ip3a");
        	var bAmout=document.getElementById("price2");
        	
     	var count01=document.getElementById("count1");
    	var count02=document.getElementById("count2");
            count01.setAttribute("value",parseInt(aInput.value)*parseInt(aAmout.value));
        	count02.setAttribute("value",parseInt(bInput.value)*parseInt(bAmout.value));
        	document.getElementById("count1").innerHTML=count01;
        	document.getElementById("count2").innerHTML=count02;

            var total=parseInt(aInput.value)*parseInt(aAmout.value)+parseInt(bInput.value)*parseInt(bAmout.value);
          alert("总计："+total);
          }catch(e){alert(e.message)}
        }
        	
        	
        	
        </script>
</html>
